#pragma once
#include "Hash_table.h";

namespace ssy
{
	template<class K>
	class unordered_set
	{
		struct unordered_set_KofT
		{
			K operator()(const K& key)
			{
				return key;
			}
		};

	public:
		typedef typename ssy::hash_table<K, K, unordered_set_KofT>::const_iterator iterator;
		typedef typename ssy::hash_table<K, K, unordered_set_KofT>::const_iterator const_iterator;


		iterator begin() const
		{
			return _ht.begin();
		}

		iterator end() const
		{
			return _ht.end();
		}

		pair<iterator, bool> insert(const K& key)
		{
			pair<typename ssy::hash_table<K, K, unordered_set_KofT>::iterator, bool> ret = _ht.insert(key);
			return pair<iterator, bool>(ret.first, ret.second);
		}

	private:
		hash_table<K, K, unordered_set_KofT> _ht;
	};
}